.class public Lcom/brixd/niceapp/community/activity/PublishAppActivity;
.super Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;
.source "PublishAppActivity.java"


# static fields
.field private static final ADD_TAG_ID:I = 0x3e8

.field private static final CACHE_VERSION:I = 0x3

.field private static final REQUEST_CODE_RESELECT_PICTURE:I = 0xa

.field private static final REQUEST_CODE_SELECT_APP:I = 0x1e

.field private static final REQUEST_CODE_SELECT_TAG:I = 0x28

.field private static final REQUEST_CODE_VIEW_PICTURES:I = 0x14


# instance fields
.field enterCharFilter:Landroid/text/InputFilter;

.field private mAddPictureView:Landroid/view/View;

.field private mAddTagTitle:Landroid/widget/TextView;

.field private mAlbumId:J

.field private mAppDescriptionEdt:Landroid/widget/EditText;

.field private mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

.field private mAppNameEdt:Landroid/widget/EditText;

.field private mAppSubtitleEdt:Landroid/widget/EditText;

.field private mBorderWidth:I

.field private mCoverImagePath:Ljava/lang/String;

.field private mFromArticleID:I

.field private mFromType:Ljava/lang/String;

.field private mGridSpace:I

.field private mIconImage:Landroid/widget/ImageView;

.field private mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

.field private mImagesServerPath:Ljava/util/LinkedList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/LinkedList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private mIsEditMode:Z

.field private mOnAddTagClickListener:Landroid/view/View$OnClickListener;

.field private mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

.field private mPendingUploadPictures:Ljava/util/LinkedList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/LinkedList",
            "<",
            "Lcom/brixd/niceapp/community/model/PictureModel;",
            ">;"
        }
    .end annotation
.end field

.field private mPictures:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/PictureModel;",
            ">;"
        }
    .end annotation
.end field

.field private mPicturesContainer:Landroid/widget/LinearLayout;

.field private mProgressHUD:Lcom/zuiapps/suite/utils/hud/ProgressHUD;

.field private mRequest:Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

.field private mScrollView:Landroid/widget/ScrollView;

.field private mTagListView:Lcom/niceapp/lib/tagview/TagListView;


# direct methods
.method public constructor <init>()V
    .registers 2

    .prologue
    .line 80
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;-><init>()V

    .line 109
    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V

    iput-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mImagesServerPath:Ljava/util/LinkedList;

    .line 110
    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V

    iput-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPendingUploadPictures:Ljava/util/LinkedList;

    .line 113
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIsEditMode:Z

    .line 360
    new-instance v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity$8;

    invoke-direct {v0, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$8;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    iput-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->enterCharFilter:Landroid/text/InputFilter;

    .line 451
    new-instance v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity$11;

    invoke-direct {v0, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$11;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    iput-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mOnAddTagClickListener:Landroid/view/View$OnClickListener;

    return-void
.end method

.method static synthetic access$000(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/app/Activity;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getActivity()Landroid/app/Activity;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$100(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$1000(Lcom/brixd/niceapp/community/activity/PublishAppActivity;Ljava/lang/String;Ljava/lang/String;)V
    .registers 3
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;
    .param p1, "x1"    # Ljava/lang/String;
    .param p2, "x2"    # Ljava/lang/String;

    .prologue
    .line 80
    invoke-direct {p0, p1, p2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->uploadAppIcon(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method static synthetic access$1100(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$1200(Lcom/brixd/niceapp/community/activity/PublishAppActivity;Ljava/lang/String;)V
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;
    .param p1, "x1"    # Ljava/lang/String;

    .prologue
    .line 80
    invoke-direct {p0, p1}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->uploadImages(Ljava/lang/String;)V

    return-void
.end method

.method static synthetic access$1300(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->hideDialog()V

    return-void
.end method

.method static synthetic access$1400(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Ljava/util/LinkedList;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPendingUploadPictures:Ljava/util/LinkedList;

    return-object v0
.end method

.method static synthetic access$1500(Lcom/brixd/niceapp/community/activity/PublishAppActivity;Ljava/lang/String;)V
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;
    .param p1, "x1"    # Ljava/lang/String;

    .prologue
    .line 80
    invoke-direct {p0, p1}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->cycleUpload(Ljava/lang/String;)V

    return-void
.end method

.method static synthetic access$1600(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Ljava/util/LinkedList;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mImagesServerPath:Ljava/util/LinkedList;

    return-object v0
.end method

.method static synthetic access$1702(Lcom/brixd/niceapp/community/activity/PublishAppActivity;Ljava/lang/String;)Ljava/lang/String;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;
    .param p1, "x1"    # Ljava/lang/String;

    .prologue
    .line 80
    iput-object p1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mCoverImagePath:Ljava/lang/String;

    return-object p1
.end method

.method static synthetic access$1800(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->publishApp()V

    return-void
.end method

.method static synthetic access$1900(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$200(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/app/Activity;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getActivity()Landroid/app/Activity;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$2000(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$2100(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$2200(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$2300(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->clearPendingPublishData()V

    return-void
.end method

.method static synthetic access$2400(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$2500(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/app/Activity;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getActivity()Landroid/app/Activity;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$2600(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$2700(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)J
    .registers 3
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    iget-wide v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAlbumId:J

    return-wide v0
.end method

.method static synthetic access$2800(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Ljava/util/ArrayList;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$2900(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/app/Activity;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getActivity()Landroid/app/Activity;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$300(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->savePendingPublishDataToLocal()V

    return-void
.end method

.method static synthetic access$3000(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$3100(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/app/Activity;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getActivity()Landroid/app/Activity;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$3200(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$3300(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/widget/ScrollView;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mScrollView:Landroid/widget/ScrollView;

    return-object v0
.end method

.method static synthetic access$400(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Landroid/app/Activity;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getActivity()Landroid/app/Activity;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$500(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Z
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    iget-boolean v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIsEditMode:Z

    return v0
.end method

.method static synthetic access$600(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->checkAndPublishApp()V

    return-void
.end method

.method static synthetic access$700(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Lcom/brixd/niceapp/community/model/CommunityAppModel;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    return-object v0
.end method

.method static synthetic access$702(Lcom/brixd/niceapp/community/activity/PublishAppActivity;Lcom/brixd/niceapp/community/model/CommunityAppModel;)Lcom/brixd/niceapp/community/model/CommunityAppModel;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;
    .param p1, "x1"    # Lcom/brixd/niceapp/community/model/CommunityAppModel;

    .prologue
    .line 80
    iput-object p1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    return-object p1
.end method

.method static synthetic access$800(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)Lcom/niceapp/lib/tagview/TagListView;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    .prologue
    .line 80
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mTagListView:Lcom/niceapp/lib/tagview/TagListView;

    return-object v0
.end method

.method static synthetic access$900(Lcom/brixd/niceapp/community/activity/PublishAppActivity;Ljava/util/List;)V
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/PublishAppActivity;
    .param p1, "x1"    # Ljava/util/List;

    .prologue
    .line 80
    invoke-direct {p0, p1}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->refreshTagArea(Ljava/util/List;)V

    return-void
.end method

.method private checkAndPublishApp()V
    .registers 2

    .prologue
    .line 367
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->validateRequestedField()Z

    move-result v0

    if-eqz v0, :cond_c

    .line 368
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->savePendingPublishDataToLocal()V

    .line 369
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->prepareUploadImages()V

    .line 371
    :cond_c
    return-void
.end method

.method private clearPendingPublishData()V
    .registers 2

    .prologue
    .line 879
    const-string v0, ""

    invoke-static {v0}, Lcom/brixd/niceapp/util/LocalCacheUtils;->savePendingPublishData(Ljava/lang/String;)V

    .line 880
    return-void
.end method

.method private cycleUpload(Ljava/lang/String;)V
    .registers 4
    .param p1, "upToken"    # Ljava/lang/String;

    .prologue
    .line 620
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPendingUploadPictures:Ljava/util/LinkedList;

    invoke-virtual {v0}, Ljava/util/LinkedList;->size()I

    move-result v0

    if-lez v0, :cond_c

    .line 621
    invoke-direct {p0, p1}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->uploadImages(Ljava/lang/String;)V

    .line 637
    :goto_b
    return-void

    .line 623
    :cond_c
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mCoverImagePath:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_1e

    .line 624
    const v0, 0x7f0c004e

    invoke-static {v0}, Lcom/brixd/niceapp/util/ToastUtils;->show(I)V

    .line 625
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->hideDialog()V

    goto :goto_b

    .line 629
    :cond_1e
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mHandler:Landroid/os/Handler;

    new-instance v1, Lcom/brixd/niceapp/community/activity/PublishAppActivity$14;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$14;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_b
.end method

.method private generatePictureView(Lcom/brixd/niceapp/community/model/PictureModel;I)Landroid/view/View;
    .registers 13
    .param p1, "picture"    # Lcom/brixd/niceapp/community/model/PictureModel;
    .param p2, "position"    # I

    .prologue
    const/high16 v9, 0x40a00000

    const/high16 v8, 0x40000000

    .line 806
    const v5, 0x7f03002e

    const/4 v6, 0x0

    invoke-static {p0, v5, v6}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v4

    .line 807
    .local v4, "view":Landroid/view/View;
    new-instance v3, Landroid/widget/LinearLayout$LayoutParams;

    iget v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mBorderWidth:I

    iget v6, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mBorderWidth:I

    invoke-direct {v3, v5, v6}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    .line 808
    .local v3, "params":Landroid/widget/LinearLayout$LayoutParams;
    invoke-virtual {v4, v3}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 809
    const v5, 0x7f0a00b6

    invoke-virtual {v4, v5}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    .line 811
    .local v0, "image":Landroid/widget/ImageView;
    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/PictureModel;->getImageUriPath()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v5

    if-eqz v5, :cond_46

    .line 812
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v5}, Ljava/util/ArrayList;->size()I

    move-result v5

    if-lez v5, :cond_42

    const v5, 0x7f020140

    :goto_36
    invoke-virtual {v0, v5}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 813
    new-instance v5, Lcom/brixd/niceapp/community/activity/PublishAppActivity$18;

    invoke-direct {v5, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$18;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    invoke-virtual {v0, v5}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 850
    :goto_41
    return-object v4

    .line 812
    :cond_42
    const v5, 0x7f020161

    goto :goto_36

    .line 826
    :cond_46
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/PictureModel;->getImageUriPath()Ljava/lang/String;

    move-result-object v6

    iget-object v7, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v5, v6, v0, v7}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    .line 827
    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/PictureModel;->isCover()Z

    move-result v5

    if-eqz v5, :cond_78

    .line 828
    const v5, 0x7f0a00d1

    invoke-virtual {v4, v5}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    .line 829
    .local v1, "imageMark":Landroid/widget/ImageView;
    new-instance v2, Landroid/widget/RelativeLayout$LayoutParams;

    iget v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mBorderWidth:I

    int-to-float v5, v5

    div-float/2addr v5, v9

    mul-float/2addr v5, v8

    float-to-int v5, v5

    iget v6, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mBorderWidth:I

    int-to-float v6, v6

    div-float/2addr v6, v9

    mul-float/2addr v6, v8

    float-to-int v6, v6

    invoke-direct {v2, v5, v6}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    .line 830
    .local v2, "markParams":Landroid/widget/RelativeLayout$LayoutParams;
    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 831
    const/4 v5, 0x0

    invoke-virtual {v1, v5}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 834
    .end local v1    # "imageMark":Landroid/widget/ImageView;
    .end local v2    # "markParams":Landroid/widget/RelativeLayout$LayoutParams;
    :cond_78
    new-instance v5, Lcom/brixd/niceapp/community/activity/PublishAppActivity$19;

    invoke-direct {v5, p0, p2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$19;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;I)V

    invoke-virtual {v0, v5}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto :goto_41
.end method

.method private getAllImageString()Ljava/lang/String;
    .registers 4

    .prologue
    .line 719
    new-instance v1, Lorg/json/JSONArray;

    invoke-direct {v1}, Lorg/json/JSONArray;-><init>()V

    .line 720
    .local v1, "images":Lorg/json/JSONArray;
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_6
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mImagesServerPath:Ljava/util/LinkedList;

    invoke-virtual {v2}, Ljava/util/LinkedList;->size()I

    move-result v2

    if-ge v0, v2, :cond_1a

    .line 721
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mImagesServerPath:Ljava/util/LinkedList;

    invoke-virtual {v2, v0}, Ljava/util/LinkedList;->get(I)Ljava/lang/Object;

    move-result-object v2

    invoke-virtual {v1, v2}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    .line 720
    add-int/lit8 v0, v0, 0x1

    goto :goto_6

    .line 723
    :cond_1a
    invoke-virtual {v1}, Lorg/json/JSONArray;->toString()Ljava/lang/String;

    move-result-object v2

    return-object v2
.end method

.method private getPictures(Lcom/brixd/niceapp/community/model/CommunityAppModel;)Ljava/util/ArrayList;
    .registers 9
    .param p1, "appModel"    # Lcom/brixd/niceapp/community/model/CommunityAppModel;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/brixd/niceapp/community/model/CommunityAppModel;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/PictureModel;",
            ">;"
        }
    .end annotation

    .prologue
    .line 240
    if-eqz p1, :cond_a

    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getId()I

    move-result v5

    if-nez v5, :cond_c

    .line 241
    :cond_a
    const/4 v4, 0x0

    .line 260
    :cond_b
    return-object v4

    .line 244
    :cond_c
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getCoverImageUrl()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v5

    invoke-virtual {v5}, Landroid/net/Uri;->getLastPathSegment()Ljava/lang/String;

    move-result-object v0

    .line 245
    .local v0, "coverImage":Ljava/lang/String;
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    .line 246
    .local v4, "pictureModels":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/community/model/PictureModel;>;"
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getDetailModels()Ljava/util/ArrayList;

    move-result-object v1

    .line 247
    .local v1, "detailModels":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/model/DetailModel;>;"
    const/4 v2, 0x0

    .local v2, "i":I
    :goto_26
    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v5

    if-ge v2, v5, :cond_b

    .line 248
    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/brixd/niceapp/model/DetailModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/DetailModel;->getType()Lcom/brixd/niceapp/model/DetailModel$DetailType;

    move-result-object v5

    sget-object v6, Lcom/brixd/niceapp/model/DetailModel$DetailType;->TYPE_IMAGE:Lcom/brixd/niceapp/model/DetailModel$DetailType;

    if-ne v5, v6, :cond_67

    .line 249
    new-instance v3, Lcom/brixd/niceapp/community/model/PictureModel;

    invoke-direct {v3}, Lcom/brixd/niceapp/community/model/PictureModel;-><init>()V

    .line 250
    .local v3, "picture":Lcom/brixd/niceapp/community/model/PictureModel;
    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/brixd/niceapp/model/DetailModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/DetailModel;->getContent()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v5}, Lcom/brixd/niceapp/community/model/PictureModel;->setImageUriPath(Ljava/lang/String;)V

    .line 251
    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/PictureModel;->getImageUriPath()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v5

    if-nez v5, :cond_64

    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/PictureModel;->getImageUriPath()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v5, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v5

    if-eqz v5, :cond_64

    .line 252
    const/4 v5, 0x1

    invoke-virtual {v3, v5}, Lcom/brixd/niceapp/community/model/PictureModel;->setIsCover(Z)V

    .line 255
    :cond_64
    invoke-virtual {v4, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 247
    .end local v3    # "picture":Lcom/brixd/niceapp/community/model/PictureModel;
    :cond_67
    add-int/lit8 v2, v2, 0x1

    goto :goto_26
.end method

.method private hideDialog()V
    .registers 2

    .prologue
    .line 727
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mProgressHUD:Lcom/zuiapps/suite/utils/hud/ProgressHUD;

    if-eqz v0, :cond_f

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->isFinishing()Z

    move-result v0

    if-nez v0, :cond_f

    .line 728
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mProgressHUD:Lcom/zuiapps/suite/utils/hud/ProgressHUD;

    invoke-virtual {v0}, Lcom/zuiapps/suite/utils/hud/ProgressHUD;->dismiss()V

    .line 730
    :cond_f
    return-void
.end method

.method private inflateTags(Ljava/util/List;)V
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/model/TagModel;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 914
    .local p1, "tags":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/TagModel;>;"
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mTagListView:Lcom/niceapp/lib/tagview/TagListView;

    const/4 v2, 0x1

    invoke-virtual {v1, p1, v2}, Lcom/niceapp/lib/tagview/TagListView;->setTags(Ljava/util/List;Z)V

    .line 915
    new-instance v0, Landroid/widget/ImageView;

    invoke-direct {v0, p0}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    .line 916
    .local v0, "addImg":Landroid/widget/ImageView;
    const v1, 0x7f020158

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 917
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mOnAddTagClickListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 918
    const/16 v1, 0x3e8

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setId(I)V

    .line 919
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mTagListView:Lcom/niceapp/lib/tagview/TagListView;

    invoke-virtual {v1, v0}, Lcom/niceapp/lib/tagview/TagListView;->addView(Landroid/view/View;)V

    .line 921
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v1

    const/4 v2, 0x6

    if-ne v1, v2, :cond_2d

    const/16 v1, 0x8

    :goto_29
    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 922
    return-void

    .line 921
    :cond_2d
    const/4 v1, 0x0

    goto :goto_29
.end method

.method private initData(Landroid/os/Bundle;)V
    .registers 16
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    .line 152
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getIntent()Landroid/content/Intent;

    move-result-object v9

    const-string v10, "IsEditMode"

    const/4 v11, 0x0

    invoke-virtual {v9, v10, v11}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v9

    iput-boolean v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIsEditMode:Z

    .line 153
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getIntent()Landroid/content/Intent;

    move-result-object v9

    const-string v10, "ArticleId"

    const/4 v11, 0x0

    invoke-virtual {v9, v10, v11}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v9

    iput v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mFromArticleID:I

    .line 154
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getIntent()Landroid/content/Intent;

    move-result-object v9

    const-string v10, "Type"

    invoke-virtual {v9, v10}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    iput-object v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mFromType:Ljava/lang/String;

    .line 156
    const/4 v5, 0x0

    .line 158
    .local v5, "loadCachedData":Z
    if-eqz p1, :cond_95

    .line 159
    const-string v9, "IsEditMode"

    invoke-virtual {p1, v9}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v9

    iput-boolean v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIsEditMode:Z

    .line 160
    const-string v9, "AlbumId"

    invoke-virtual {p1, v9}, Landroid/os/Bundle;->getLong(Ljava/lang/String;)J

    move-result-wide v10

    iput-wide v10, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAlbumId:J

    .line 162
    const-string v9, "AppModel"

    invoke-virtual {p1, v9}, Landroid/os/Bundle;->getSerializable(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v9

    check-cast v9, Lcom/brixd/niceapp/community/model/CommunityAppModel;

    iput-object v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    .line 163
    const-string v9, "Pictures"

    invoke-virtual {p1, v9}, Landroid/os/Bundle;->getParcelableArrayList(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v9

    iput-object v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    .line 165
    const/4 v5, 0x1

    .line 197
    :cond_4c
    :goto_4c
    if-nez v5, :cond_72

    .line 198
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getIntent()Landroid/content/Intent;

    move-result-object v9

    const-string v10, "AlbumId"

    const-wide/16 v12, 0x0

    invoke-virtual {v9, v10, v12, v13}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J

    move-result-wide v10

    iput-wide v10, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAlbumId:J

    .line 199
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getIntent()Landroid/content/Intent;

    move-result-object v9

    const-string v10, "AppModel"

    invoke-virtual {v9, v10}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v9

    check-cast v9, Lcom/brixd/niceapp/community/model/CommunityAppModel;

    iput-object v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    .line 201
    iget-object v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-direct {p0, v9}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getPictures(Lcom/brixd/niceapp/community/model/CommunityAppModel;)Ljava/util/ArrayList;

    move-result-object v9

    iput-object v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    .line 204
    :cond_72
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->initIfNull()V

    .line 207
    const/4 v4, 0x0

    .local v4, "i":I
    :goto_76
    iget-object v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getTags()Ljava/util/List;

    move-result-object v9

    invoke-interface {v9}, Ljava/util/List;->size()I

    move-result v9

    if-ge v4, v9, :cond_102

    .line 208
    iget-object v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getTags()Ljava/util/List;

    move-result-object v9

    invoke-interface {v9, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Lcom/brixd/niceapp/model/TagModel;

    const/4 v10, 0x1

    invoke-virtual {v9, v10}, Lcom/brixd/niceapp/model/TagModel;->setChecked(Z)V

    .line 207
    add-int/lit8 v4, v4, 0x1

    goto :goto_76

    .line 166
    .end local v4    # "i":I
    :cond_95
    iget-boolean v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIsEditMode:Z

    if-nez v9, :cond_4c

    .line 168
    invoke-static {}, Lcom/brixd/niceapp/util/LocalCacheUtils;->getPendingPublishData()Ljava/lang/String;

    move-result-object v7

    .line 169
    .local v7, "savedData":Ljava/lang/String;
    invoke-static {v7}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v9

    if-nez v9, :cond_4c

    .line 171
    :try_start_a3
    new-instance v8, Lorg/json/JSONObject;

    invoke-direct {v8, v7}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 172
    .local v8, "savedJson":Lorg/json/JSONObject;
    const-string v9, "Version"

    invoke-virtual {v8, v9}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v1

    .line 173
    .local v1, "cacheVersion":I
    const/4 v9, 0x3

    if-ge v1, v9, :cond_be

    .line 174
    new-instance v9, Ljava/lang/Exception;

    const-string v10, "Low version cache"

    invoke-direct {v9, v10}, Ljava/lang/Exception;-><init>(Ljava/lang/String;)V

    throw v9
    :try_end_b9
    .catch Lorg/json/JSONException; {:try_start_a3 .. :try_end_b9} :catch_b9
    .catch Ljava/lang/Exception; {:try_start_a3 .. :try_end_b9} :catch_fc

    .line 188
    .end local v1    # "cacheVersion":I
    .end local v8    # "savedJson":Lorg/json/JSONObject;
    :catch_b9
    move-exception v2

    .line 189
    .local v2, "e":Lorg/json/JSONException;
    invoke-virtual {v2}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_4c

    .line 177
    .end local v2    # "e":Lorg/json/JSONException;
    .restart local v1    # "cacheVersion":I
    .restart local v8    # "savedJson":Lorg/json/JSONObject;
    :cond_be
    :try_start_be
    const-string v9, "AlbumId"

    invoke-virtual {v8, v9}, Lorg/json/JSONObject;->optLong(Ljava/lang/String;)J

    move-result-wide v10

    iput-wide v10, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAlbumId:J

    .line 178
    new-instance v3, Lcom/google/gson/Gson;

    invoke-direct {v3}, Lcom/google/gson/Gson;-><init>()V

    .line 179
    .local v3, "gson":Lcom/google/gson/Gson;
    const-string v9, "AppModel"

    invoke-virtual {v8, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 180
    .local v0, "appModelJson":Ljava/lang/String;
    new-instance v9, Lcom/brixd/niceapp/community/activity/PublishAppActivity$1;

    invoke-direct {v9, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$1;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    .line 181
    invoke-virtual {v9}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$1;->getType()Ljava/lang/reflect/Type;

    move-result-object v9

    .line 180
    invoke-virtual {v3, v0, v9}, Lcom/google/gson/Gson;->fromJson(Ljava/lang/String;Ljava/lang/reflect/Type;)Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Lcom/brixd/niceapp/community/model/CommunityAppModel;

    iput-object v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    .line 183
    const-string v9, "Pictures"

    invoke-virtual {v8, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    .line 184
    .local v6, "picturesJson":Ljava/lang/String;
    new-instance v9, Lcom/brixd/niceapp/community/activity/PublishAppActivity$2;

    invoke-direct {v9, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$2;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    .line 185
    invoke-virtual {v9}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$2;->getType()Ljava/lang/reflect/Type;

    move-result-object v9

    .line 184
    invoke-virtual {v3, v6, v9}, Lcom/google/gson/Gson;->fromJson(Ljava/lang/String;Ljava/lang/reflect/Type;)Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Ljava/util/ArrayList;

    iput-object v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;
    :try_end_f9
    .catch Lorg/json/JSONException; {:try_start_be .. :try_end_f9} :catch_b9
    .catch Ljava/lang/Exception; {:try_start_be .. :try_end_f9} :catch_fc

    .line 186
    const/4 v5, 0x1

    goto/16 :goto_4c

    .line 190
    .end local v0    # "appModelJson":Ljava/lang/String;
    .end local v1    # "cacheVersion":I
    .end local v3    # "gson":Lcom/google/gson/Gson;
    .end local v6    # "picturesJson":Ljava/lang/String;
    .end local v8    # "savedJson":Lorg/json/JSONObject;
    :catch_fc
    move-exception v2

    .line 191
    .local v2, "e":Ljava/lang/Exception;
    invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V

    goto/16 :goto_4c

    .line 211
    .end local v2    # "e":Ljava/lang/Exception;
    .end local v7    # "savedData":Ljava/lang/String;
    .restart local v4    # "i":I
    :cond_102
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v9

    const v10, 0x7f09007c

    invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v9

    iput v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mGridSpace:I

    .line 213
    invoke-static {}, Lcom/nostra13/universalimageloader/core/ImageLoader;->getInstance()Lcom/nostra13/universalimageloader/core/ImageLoader;

    move-result-object v9

    iput-object v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    .line 214
    new-instance v9, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    invoke-direct {v9}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;-><init>()V

    const/4 v10, 0x1

    invoke-virtual {v9, v10}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->resetViewBeforeLoading(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v9

    const/4 v10, 0x1

    invoke-virtual {v9, v10}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheInMemory(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v9

    const/4 v10, 0x1

    invoke-virtual {v9, v10}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheOnDisc(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v9

    sget-object v10, Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;->EXACTLY:Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;

    invoke-virtual {v9, v10}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->imageScaleType(Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v9

    sget-object v10, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;

    .line 215
    invoke-virtual {v9, v10}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->bitmapConfig(Landroid/graphics/Bitmap$Config;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v9

    new-instance v10, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;

    invoke-direct {v10}, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;-><init>()V

    invoke-virtual {v9, v10}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->displayer(Lcom/nostra13/universalimageloader/core/display/BitmapDisplayer;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v9

    const v10, 0x7f0200d8

    invoke-virtual {v9, v10}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnFail(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v9

    const v10, 0x7f0200d8

    .line 216
    invoke-virtual {v9, v10}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnLoading(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v9

    const v10, 0x7f0200d8

    invoke-virtual {v9, v10}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageForEmptyUri(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v9

    invoke-virtual {v9}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->build()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v9

    iput-object v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    .line 218
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->setDefaultCover()V

    .line 219
    return-void
.end method

.method private initIfNull()V
    .registers 3

    .prologue
    .line 222
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    if-nez v0, :cond_27

    .line 223
    new-instance v0, Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-direct {v0}, Lcom/brixd/niceapp/community/model/CommunityAppModel;-><init>()V

    iput-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    .line 224
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    const-string v1, ""

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAppName(Ljava/lang/String;)V

    .line 225
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    const-string v1, ""

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setSubTitle(Ljava/lang/String;)V

    .line 226
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    const-string v1, ""

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setPackageName(Ljava/lang/String;)V

    .line 227
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    const-string v1, ""

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setDigest(Ljava/lang/String;)V

    .line 230
    :cond_27
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v0}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getTags()Ljava/util/List;

    move-result-object v0

    if-nez v0, :cond_39

    .line 231
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setTags(Ljava/util/List;)V

    .line 234
    :cond_39
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    if-nez v0, :cond_44

    .line 235
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    .line 237
    :cond_44
    return-void
.end method

.method private initWidgets()V
    .registers 7

    .prologue
    .line 264
    const v2, 0x7f0a0084

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    iput-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIconImage:Landroid/widget/ImageView;

    .line 265
    const v2, 0x7f0a0085

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/EditText;

    iput-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppNameEdt:Landroid/widget/EditText;

    .line 266
    const v2, 0x7f0a008b

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/EditText;

    iput-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppSubtitleEdt:Landroid/widget/EditText;

    .line 267
    const v2, 0x7f0a008d

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/EditText;

    iput-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppDescriptionEdt:Landroid/widget/EditText;

    .line 268
    const v2, 0x7f0a0088

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAddTagTitle:Landroid/widget/TextView;

    .line 269
    const v2, 0x7f0a0089

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Lcom/niceapp/lib/tagview/TagListView;

    iput-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mTagListView:Lcom/niceapp/lib/tagview/TagListView;

    .line 270
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mTagListView:Lcom/niceapp/lib/tagview/TagListView;

    const/4 v3, 0x1

    invoke-virtual {v2, v3}, Lcom/niceapp/lib/tagview/TagListView;->setDeleteMode(Z)V

    .line 272
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getTags()Ljava/util/List;

    move-result-object v2

    invoke-direct {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->inflateTags(Ljava/util/List;)V

    .line 273
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getTags()Ljava/util/List;

    move-result-object v2

    invoke-direct {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->refreshTagArea(Ljava/util/List;)V

    .line 275
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppNameEdt:Landroid/widget/EditText;

    invoke-static {}, Lcom/brixd/niceapp/util/SettingUtils;->getCommunityPubSelectAppHint()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/EditText;->setHint(Ljava/lang/CharSequence;)V

    .line 276
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppSubtitleEdt:Landroid/widget/EditText;

    invoke-static {}, Lcom/brixd/niceapp/util/SettingUtils;->getCommunityPubSubtitleHint()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/EditText;->setHint(Ljava/lang/CharSequence;)V

    .line 277
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppDescriptionEdt:Landroid/widget/EditText;

    invoke-static {}, Lcom/brixd/niceapp/util/SettingUtils;->getCommunityPubContentHint()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/EditText;->setHint(Ljava/lang/CharSequence;)V

    .line 278
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAddTagTitle:Landroid/widget/TextView;

    invoke-static {}, Lcom/brixd/niceapp/util/SettingUtils;->getCommunityPubSelectTagHint()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setHint(Ljava/lang/CharSequence;)V

    .line 279
    const v2, 0x7f0a0081

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    invoke-static {}, Lcom/brixd/niceapp/util/SettingUtils;->getCommunityPubSelectPictureHint()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setHint(Ljava/lang/CharSequence;)V

    .line 281
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppNameEdt:Landroid/widget/EditText;

    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getAppName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 282
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppSubtitleEdt:Landroid/widget/EditText;

    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getSubTitle()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 283
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppDescriptionEdt:Landroid/widget/EditText;

    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getDigest()Ljava/lang/String;

    move-result-object v3

    const-string v4, "<br>"

    const-string v5, "\n"

    invoke-virtual {v3, v4, v5}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 285
    const v2, 0x7f0a007e

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ScrollView;

    iput-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mScrollView:Landroid/widget/ScrollView;

    .line 286
    const v2, 0x7f0a0080

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    iput-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAddPictureView:Landroid/view/View;

    .line 287
    const v2, 0x7f0a0082

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/LinearLayout;

    iput-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPicturesContainer:Landroid/widget/LinearLayout;

    .line 289
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v2

    iget v1, v2, Landroid/util/DisplayMetrics;->widthPixels:I

    .line 290
    .local v1, "screenWidth":I
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPicturesContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v2}, Landroid/widget/LinearLayout;->getPaddingLeft()I

    move-result v2

    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPicturesContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v3}, Landroid/widget/LinearLayout;->getPaddingRight()I

    move-result v3

    add-int v0, v2, v3

    .line 291
    .local v0, "padding":I
    sub-int v2, v1, v0

    iget v3, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mGridSpace:I

    mul-int/lit8 v3, v3, 0x2

    sub-int/2addr v2, v3

    div-int/lit8 v2, v2, 0x3

    iput v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mBorderWidth:I

    .line 293
    const v2, 0x7f0c005a

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->setTopTitle(I)V

    .line 294
    const v2, 0x7f0c0037

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->setBackText(I)V

    .line 295
    const v2, 0x7f0c00bf

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->setCommitBtnText(I)V

    .line 297
    const/4 v2, 0x0

    invoke-direct {p0, v2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->loadIcon(Z)V

    .line 298
    return-void
.end method

.method private initWidgetsActions()V
    .registers 5

    .prologue
    .line 301
    iget-boolean v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIsEditMode:Z

    if-nez v0, :cond_e

    .line 302
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppNameEdt:Landroid/widget/EditText;

    new-instance v1, Lcom/brixd/niceapp/community/activity/PublishAppActivity$3;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$3;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 314
    :cond_e
    new-instance v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity$4;

    invoke-direct {v0, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$4;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->setOnBackClickListener(Landroid/view/View$OnClickListener;)V

    .line 326
    new-instance v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity$5;

    invoke-direct {v0, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$5;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->setOnCommitClickListener(Landroid/view/View$OnClickListener;)V

    .line 336
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getSwipeBackLayout()Lcom/brixd/android/swipeback/lib/SwipeBackLayout;

    move-result-object v0

    new-instance v1, Lcom/brixd/niceapp/community/activity/PublishAppActivity$6;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$6;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    invoke-virtual {v0, v1}, Lcom/brixd/android/swipeback/lib/SwipeBackLayout;->setOnSwipeToFinishListener(Lcom/brixd/android/swipeback/lib/SwipeBackLayout$SwipeToFinishListener;)V

    .line 345
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAddTagTitle:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mOnAddTagClickListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 347
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mTagListView:Lcom/niceapp/lib/tagview/TagListView;

    new-instance v1, Lcom/brixd/niceapp/community/activity/PublishAppActivity$7;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$7;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    invoke-virtual {v0, v1}, Lcom/niceapp/lib/tagview/TagListView;->setOnTagClickListener(Lcom/niceapp/lib/tagview/TagListView$OnTagClickListener;)V

    .line 357
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppSubtitleEdt:Landroid/widget/EditText;

    const/4 v1, 0x1

    new-array v1, v1, [Landroid/text/InputFilter;

    const/4 v2, 0x0

    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->enterCharFilter:Landroid/text/InputFilter;

    aput-object v3, v1, v2

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setFilters([Landroid/text/InputFilter;)V

    .line 358
    return-void
.end method

.method private loadIcon(Z)V
    .registers 7
    .param p1, "uploadIcon"    # Z

    .prologue
    .line 374
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getPackageName()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_14

    .line 375
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIconImage:Landroid/widget/ImageView;

    const/16 v2, 0x8

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 395
    :cond_13
    :goto_13
    return-void

    .line 377
    :cond_14
    iget-boolean v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIsEditMode:Z

    if-eqz v1, :cond_28

    .line 378
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getIconUrl()Ljava/lang/String;

    move-result-object v2

    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIconImage:Landroid/widget/ImageView;

    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v1, v2, v3, v4}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    goto :goto_13

    .line 380
    :cond_28
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getContext()Landroid/content/Context;

    move-result-object v1

    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/zuiapps/suite/utils/app/AppUtil;->getAppIcon(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    .line 381
    .local v0, "drawable":Landroid/graphics/drawable/Drawable;
    if-eqz v0, :cond_4b

    .line 382
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIconImage:Landroid/widget/ImageView;

    invoke-virtual {v1}, Landroid/widget/ImageView;->getVisibility()I

    move-result v1

    if-eqz v1, :cond_46

    .line 383
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIconImage:Landroid/widget/ImageView;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 386
    :cond_46
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIconImage:Landroid/widget/ImageView;

    invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 389
    :cond_4b
    if-eqz p1, :cond_13

    .line 390
    invoke-direct {p0, v0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->prepareUploadAppIcon(Landroid/graphics/drawable/Drawable;)V

    goto :goto_13
.end method

.method private prepareUploadAppIcon(Landroid/graphics/drawable/Drawable;)V
    .registers 11
    .param p1, "drawable"    # Landroid/graphics/drawable/Drawable;

    .prologue
    .line 399
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/brixd/niceapp/application/NiceAppApplication;->getMyApplication()Lcom/brixd/niceapp/application/NiceAppApplication;

    move-result-object v2

    invoke-virtual {v2}, Lcom/brixd/niceapp/application/NiceAppApplication;->getImageIconFolderPath()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    .line 400
    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getAppName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ""

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    const-string v3, ""

    invoke-static {v2, v3}, Lcom/brixd/niceapp/util/ImageUtils;->generateImageName(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 401
    .local v0, "iconPath":Ljava/lang/String;
    invoke-static {p1, v0}, Lcom/zuiapps/suite/utils/image/ImageUtils;->drawableToFile(Landroid/graphics/drawable/Drawable;Ljava/lang/String;)V

    .line 402
    invoke-static {}, Lcom/brixd/niceapp/service/UserService;->getLoginUser()Lcom/brixd/niceapp/model/UserModel;

    move-result-object v7

    .line 403
    .local v7, "mUserModel":Lcom/brixd/niceapp/model/UserModel;
    invoke-static {v7}, Lcom/brixd/niceapp/util/SecrUtils;->makeToken(Lcom/brixd/niceapp/model/UserModel;)Lcom/brixd/niceapp/model/Token;

    move-result-object v8

    .line 404
    .local v8, "token":Lcom/brixd/niceapp/model/Token;
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mRequest:Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    if-nez v1, :cond_5b

    .line 405
    invoke-static {p0}, Lcom/brixd/niceapp/service/adapter/ReqRestAdapter;->niceAppAdapter(Landroid/content/Context;)Lretrofit/RestAdapter;

    move-result-object v1

    const-class v2, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    invoke-virtual {v1, v2}, Lretrofit/RestAdapter;->create(Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    iput-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mRequest:Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    .line 407
    :cond_5b
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mRequest:Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    invoke-virtual {v8}, Lcom/brixd/niceapp/model/Token;->getTimestamp()J

    move-result-wide v2

    invoke-virtual {v8}, Lcom/brixd/niceapp/model/Token;->getUid()I

    move-result v4

    invoke-virtual {v8}, Lcom/brixd/niceapp/model/Token;->getSecr()Ljava/lang/String;

    move-result-object v5

    new-instance v6, Lcom/brixd/niceapp/community/activity/PublishAppActivity$9;

    invoke-direct {v6, p0, v0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$9;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;Ljava/lang/String;)V

    invoke-interface/range {v1 .. v6}, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;->queryUpToken(JILjava/lang/String;Lretrofit/Callback;)V

    .line 426
    return-void
.end method

.method private prepareUploadImages()V
    .registers 9

    .prologue
    .line 514
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mProgressHUD:Lcom/zuiapps/suite/utils/hud/ProgressHUD;

    if-nez v1, :cond_57

    .line 515
    const-string v1, ""

    const v2, 0x7f040003

    const/4 v3, 0x0

    const/4 v4, 0x0

    invoke-static {p0, v1, v2, v3, v4}, Lcom/zuiapps/suite/utils/hud/ProgressHUD;->show(Landroid/content/Context;Ljava/lang/CharSequence;IZLandroid/content/DialogInterface$OnCancelListener;)Lcom/zuiapps/suite/utils/hud/ProgressHUD;

    move-result-object v1

    iput-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mProgressHUD:Lcom/zuiapps/suite/utils/hud/ProgressHUD;

    .line 520
    :goto_11
    const-string v1, ""

    iput-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mCoverImagePath:Ljava/lang/String;

    .line 521
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mImagesServerPath:Ljava/util/LinkedList;

    invoke-virtual {v1}, Ljava/util/LinkedList;->clear()V

    .line 522
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPendingUploadPictures:Ljava/util/LinkedList;

    invoke-virtual {v1}, Ljava/util/LinkedList;->clear()V

    .line 523
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPendingUploadPictures:Ljava/util/LinkedList;

    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v1, v2}, Ljava/util/LinkedList;->addAll(Ljava/util/Collection;)Z

    .line 525
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mRequest:Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    if-nez v1, :cond_38

    .line 526
    invoke-static {p0}, Lcom/brixd/niceapp/service/adapter/ReqRestAdapter;->niceAppAdapter(Landroid/content/Context;)Lretrofit/RestAdapter;

    move-result-object v1

    const-class v2, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    invoke-virtual {v1, v2}, Lretrofit/RestAdapter;->create(Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    iput-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mRequest:Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    .line 529
    :cond_38
    invoke-static {}, Lcom/brixd/niceapp/service/UserService;->getLoginUser()Lcom/brixd/niceapp/model/UserModel;

    move-result-object v0

    .line 530
    .local v0, "mUserModel":Lcom/brixd/niceapp/model/UserModel;
    invoke-static {v0}, Lcom/brixd/niceapp/util/SecrUtils;->makeToken(Lcom/brixd/niceapp/model/UserModel;)Lcom/brixd/niceapp/model/Token;

    move-result-object v7

    .line 531
    .local v7, "token":Lcom/brixd/niceapp/model/Token;
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mRequest:Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    invoke-virtual {v7}, Lcom/brixd/niceapp/model/Token;->getTimestamp()J

    move-result-wide v2

    invoke-virtual {v7}, Lcom/brixd/niceapp/model/Token;->getUid()I

    move-result v4

    invoke-virtual {v7}, Lcom/brixd/niceapp/model/Token;->getSecr()Ljava/lang/String;

    move-result-object v5

    new-instance v6, Lcom/brixd/niceapp/community/activity/PublishAppActivity$12;

    invoke-direct {v6, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$12;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    invoke-interface/range {v1 .. v6}, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;->queryUpToken(JILjava/lang/String;Lretrofit/Callback;)V

    .line 552
    return-void

    .line 517
    .end local v0    # "mUserModel":Lcom/brixd/niceapp/model/UserModel;
    .end local v7    # "token":Lcom/brixd/niceapp/model/Token;
    :cond_57
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mProgressHUD:Lcom/zuiapps/suite/utils/hud/ProgressHUD;

    invoke-virtual {v1}, Lcom/zuiapps/suite/utils/hud/ProgressHUD;->show()V

    goto :goto_11
.end method

.method private publishApp()V
    .registers 33

    .prologue
    .line 640
    invoke-static {}, Lcom/brixd/niceapp/service/UserService;->getLoginUser()Lcom/brixd/niceapp/model/UserModel;

    move-result-object v2

    .line 641
    .local v2, "mUserModel":Lcom/brixd/niceapp/model/UserModel;
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppNameEdt:Landroid/widget/EditText;

    invoke-virtual {v3}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v5

    .line 642
    .local v5, "appName":Ljava/lang/String;
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppSubtitleEdt:Landroid/widget/EditText;

    invoke-virtual {v3}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v6

    .line 643
    .local v6, "appSubTitle":Ljava/lang/String;
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppDescriptionEdt:Landroid/widget/EditText;

    invoke-virtual {v3}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v3

    const-string v4, "\n"

    const-string v7, "<br>"

    invoke-virtual {v3, v4, v7}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    .line 644
    .local v9, "description":Ljava/lang/String;
    invoke-direct/range {p0 .. p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getAllImageString()Ljava/lang/String;

    move-result-object v11

    .line 645
    .local v11, "allImageString":Ljava/lang/String;
    invoke-static {v2}, Lcom/brixd/niceapp/util/SecrUtils;->makeToken(Lcom/brixd/niceapp/model/UserModel;)Lcom/brixd/niceapp/model/Token;

    move-result-object v31

    .line 647
    .local v31, "token":Lcom/brixd/niceapp/model/Token;
    move-object/from16 v0, p0

    iget-boolean v3, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIsEditMode:Z

    if-eqz v3, :cond_89

    .line 649
    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mRequest:Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v4}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getId()I

    move-result v4

    move-object/from16 v0, p0

    iget-object v7, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v7}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getPackageName()Ljava/lang/String;

    move-result-object v7

    move-object/from16 v0, p0

    iget-object v8, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    .line 650
    invoke-virtual {v8}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getTags()Ljava/util/List;

    move-result-object v8

    invoke-static {v8}, Lcom/brixd/niceapp/model/TagModel;->convertTagsToJSONString(Ljava/util/List;)Ljava/lang/String;

    move-result-object v8

    move-object/from16 v0, p0

    iget-object v10, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mCoverImagePath:Ljava/lang/String;

    const/4 v12, 0x0

    const/4 v13, 0x2

    .line 651
    invoke-virtual/range {v31 .. v31}, Lcom/brixd/niceapp/model/Token;->getTimestamp()J

    move-result-wide v14

    invoke-virtual/range {v31 .. v31}, Lcom/brixd/niceapp/model/Token;->getUid()I

    move-result v16

    invoke-virtual/range {v31 .. v31}, Lcom/brixd/niceapp/model/Token;->getSecr()Ljava/lang/String;

    move-result-object v17

    new-instance v18, Lcom/brixd/niceapp/community/activity/PublishAppActivity$15;

    move-object/from16 v0, v18

    move-object/from16 v1, p0

    invoke-direct {v0, v1}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$15;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    .line 649
    invoke-interface/range {v3 .. v18}, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;->editCommunityApp(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;FIJILjava/lang/String;Lretrofit/Callback;)V

    .line 716
    :goto_88
    return-void

    .line 675
    :cond_89
    new-instance v30, Lcom/brixd/niceapp/community/activity/PublishAppActivity$16;

    move-object/from16 v0, v30

    move-object/from16 v1, p0

    invoke-direct {v0, v1}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$16;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    .line 705
    .local v30, "callback":Lretrofit/Callback;, "Lretrofit/Callback<Lorg/json/JSONObject;>;"
    move-object/from16 v0, p0

    iget v3, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mFromArticleID:I

    if-lez v3, :cond_fe

    .line 706
    move-object/from16 v0, p0

    iget-object v13, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mRequest:Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getSubTitle()Ljava/lang/String;

    move-result-object v15

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v4}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getIconUrl()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v16

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getPackageName()Ljava/lang/String;

    move-result-object v17

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    .line 707
    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getTags()Ljava/util/List;

    move-result-object v3

    invoke-static {v3}, Lcom/brixd/niceapp/model/TagModel;->convertTagsToJSONString(Ljava/util/List;)Ljava/lang/String;

    move-result-object v18

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mCoverImagePath:Ljava/lang/String;

    move-object/from16 v20, v0

    const/16 v22, 0x0

    const/16 v23, 0x2

    .line 708
    invoke-virtual/range {v31 .. v31}, Lcom/brixd/niceapp/model/Token;->getTimestamp()J

    move-result-wide v24

    invoke-virtual/range {v31 .. v31}, Lcom/brixd/niceapp/model/Token;->getUid()I

    move-result v26

    invoke-virtual/range {v31 .. v31}, Lcom/brixd/niceapp/model/Token;->getSecr()Ljava/lang/String;

    move-result-object v27

    move-object/from16 v0, p0

    iget v0, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mFromArticleID:I

    move/from16 v28, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mFromType:Ljava/lang/String;

    move-object/from16 v29, v0

    move-object v14, v5

    move-object/from16 v19, v9

    move-object/from16 v21, v11

    .line 706
    invoke-interface/range {v13 .. v30}, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;->publishApp(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;FIJILjava/lang/String;ILjava/lang/String;Lretrofit/Callback;)V

    goto :goto_88

    .line 710
    :cond_fe
    move-object/from16 v0, p0

    iget-object v15, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mRequest:Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getSubTitle()Ljava/lang/String;

    move-result-object v17

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v4}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getIconUrl()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v18

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getPackageName()Ljava/lang/String;

    move-result-object v19

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    .line 711
    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getTags()Ljava/util/List;

    move-result-object v3

    invoke-static {v3}, Lcom/brixd/niceapp/model/TagModel;->convertTagsToJSONString(Ljava/util/List;)Ljava/lang/String;

    move-result-object v20

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mCoverImagePath:Ljava/lang/String;

    move-object/from16 v22, v0

    const/16 v24, 0x0

    const/16 v25, 0x2

    .line 712
    invoke-virtual/range {v31 .. v31}, Lcom/brixd/niceapp/model/Token;->getTimestamp()J

    move-result-wide v26

    invoke-virtual/range {v31 .. v31}, Lcom/brixd/niceapp/model/Token;->getUid()I

    move-result v28

    invoke-virtual/range {v31 .. v31}, Lcom/brixd/niceapp/model/Token;->getSecr()Ljava/lang/String;

    move-result-object v29

    move-object/from16 v16, v5

    move-object/from16 v21, v9

    move-object/from16 v23, v11

    .line 710
    invoke-interface/range {v15 .. v30}, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;->publishApp(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;FIJILjava/lang/String;Lretrofit/Callback;)V

    goto/16 :goto_88
.end method

.method private refreshPictures()V
    .registers 9

    .prologue
    const/16 v7, 0x8

    const/4 v6, 0x0

    .line 748
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v5}, Ljava/util/ArrayList;->size()I

    move-result v5

    if-nez v5, :cond_20

    .line 749
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAddPictureView:Landroid/view/View;

    invoke-virtual {v5, v6}, Landroid/view/View;->setVisibility(I)V

    .line 750
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPicturesContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v5, v7}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 752
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAddPictureView:Landroid/view/View;

    new-instance v6, Lcom/brixd/niceapp/community/activity/PublishAppActivity$17;

    invoke-direct {v6, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$17;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    invoke-virtual {v5, v6}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 803
    :cond_1f
    return-void

    .line 766
    :cond_20
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAddPictureView:Landroid/view/View;

    invoke-virtual {v5, v7}, Landroid/view/View;->setVisibility(I)V

    .line 767
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPicturesContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v5, v6}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 770
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPicturesContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v5}, Landroid/widget/LinearLayout;->removeAllViews()V

    .line 771
    const/4 v2, 0x0

    .line 773
    .local v2, "row":Landroid/widget/LinearLayout;
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v5}, Ljava/util/ArrayList;->size()I

    move-result v5

    const/16 v6, 0x9

    if-lt v5, v6, :cond_96

    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v5}, Ljava/util/ArrayList;->size()I

    move-result v3

    .line 774
    .local v3, "size":I
    :goto_40
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_41
    if-ge v0, v3, :cond_1f

    .line 776
    rem-int/lit8 v5, v0, 0x3

    if-nez v5, :cond_6b

    .line 777
    new-instance v2, Landroid/widget/LinearLayout;

    .end local v2    # "row":Landroid/widget/LinearLayout;
    invoke-direct {v2, p0}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 778
    .restart local v2    # "row":Landroid/widget/LinearLayout;
    new-instance v1, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v5, -0x1

    const/4 v6, -0x2

    invoke-direct {v1, v5, v6}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    .line 780
    .local v1, "params":Landroid/widget/LinearLayout$LayoutParams;
    div-int/lit8 v5, v0, 0x3

    iget-object v6, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v6}, Ljava/util/ArrayList;->size()I

    move-result v6

    div-int/lit8 v6, v6, 0x3

    if-eq v5, v6, :cond_63

    .line 781
    iget v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mGridSpace:I

    iput v5, v1, Landroid/widget/LinearLayout$LayoutParams;->bottomMargin:I

    .line 784
    :cond_63
    invoke-virtual {v2, v1}, Landroid/widget/LinearLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 785
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPicturesContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v5, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 789
    .end local v1    # "params":Landroid/widget/LinearLayout$LayoutParams;
    :cond_6b
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v5}, Ljava/util/ArrayList;->size()I

    move-result v5

    if-ge v0, v5, :cond_9f

    .line 790
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v5, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/brixd/niceapp/community/model/PictureModel;

    invoke-direct {p0, v5, v0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->generatePictureView(Lcom/brixd/niceapp/community/model/PictureModel;I)Landroid/view/View;

    move-result-object v4

    .line 795
    .local v4, "view":Landroid/view/View;
    :goto_7f
    invoke-virtual {v4}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout$LayoutParams;

    .line 796
    .restart local v1    # "params":Landroid/widget/LinearLayout$LayoutParams;
    rem-int/lit8 v5, v0, 0x3

    if-eqz v5, :cond_8d

    .line 797
    iget v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mGridSpace:I

    iput v5, v1, Landroid/widget/LinearLayout$LayoutParams;->leftMargin:I

    .line 799
    :cond_8d
    invoke-virtual {v4, v1}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 800
    invoke-virtual {v2, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 774
    add-int/lit8 v0, v0, 0x1

    goto :goto_41

    .line 773
    .end local v0    # "i":I
    .end local v1    # "params":Landroid/widget/LinearLayout$LayoutParams;
    .end local v3    # "size":I
    .end local v4    # "view":Landroid/view/View;
    :cond_96
    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v5}, Ljava/util/ArrayList;->size()I

    move-result v5

    add-int/lit8 v3, v5, 0x1

    goto :goto_40

    .line 792
    .restart local v0    # "i":I
    .restart local v3    # "size":I
    :cond_9f
    new-instance v5, Lcom/brixd/niceapp/community/model/PictureModel;

    invoke-direct {v5}, Lcom/brixd/niceapp/community/model/PictureModel;-><init>()V

    invoke-direct {p0, v5, v0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->generatePictureView(Lcom/brixd/niceapp/community/model/PictureModel;I)Landroid/view/View;

    move-result-object v4

    .restart local v4    # "view":Landroid/view/View;
    goto :goto_7f
.end method

.method private refreshTagArea(Ljava/util/List;)V
    .registers 7
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/model/TagModel;",
            ">;)V"
        }
    .end annotation

    .prologue
    .local p1, "selectedTags":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/TagModel;>;"
    const/16 v1, 0x8

    const/4 v2, 0x0

    .line 898
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v3

    if-lez v3, :cond_2a

    .line 899
    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAddTagTitle:Landroid/widget/TextView;

    invoke-virtual {v3, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 900
    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mTagListView:Lcom/niceapp/lib/tagview/TagListView;

    invoke-virtual {v3, v2}, Lcom/niceapp/lib/tagview/TagListView;->setVisibility(I)V

    .line 902
    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mTagListView:Lcom/niceapp/lib/tagview/TagListView;

    const/16 v4, 0x3e8

    invoke-virtual {v3, v4}, Lcom/niceapp/lib/tagview/TagListView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    .line 903
    .local v0, "addImg":Landroid/view/View;
    if-eqz v0, :cond_27

    .line 904
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v3

    const/4 v4, 0x6

    if-ne v3, v4, :cond_28

    :goto_24
    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 911
    .end local v0    # "addImg":Landroid/view/View;
    :cond_27
    :goto_27
    return-void

    .restart local v0    # "addImg":Landroid/view/View;
    :cond_28
    move v1, v2

    .line 904
    goto :goto_24

    .line 908
    .end local v0    # "addImg":Landroid/view/View;
    :cond_2a
    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAddTagTitle:Landroid/widget/TextView;

    invoke-virtual {v3, v2}, Landroid/widget/TextView;->setVisibility(I)V

    .line 909
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mTagListView:Lcom/niceapp/lib/tagview/TagListView;

    invoke-virtual {v2, v1}, Lcom/niceapp/lib/tagview/TagListView;->setVisibility(I)V

    goto :goto_27
.end method

.method private savePendingPublishDataToLocal()V
    .registers 9

    .prologue
    .line 854
    iget-boolean v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIsEditMode:Z

    if-eqz v4, :cond_5

    .line 876
    :goto_4
    return-void

    .line 858
    :cond_5
    new-instance v1, Lcom/google/gson/Gson;

    invoke-direct {v1}, Lcom/google/gson/Gson;-><init>()V

    .line 859
    .local v1, "gson":Lcom/google/gson/Gson;
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v1, v4}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    .line 860
    .local v2, "picturesJson":Ljava/lang/String;
    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3}, Lorg/json/JSONObject;-><init>()V

    .line 862
    .local v3, "savedData":Lorg/json/JSONObject;
    :try_start_15
    const-string v4, "Version"

    const/4 v5, 0x3

    invoke-virtual {v3, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    .line 863
    const-string v4, "AlbumId"

    iget-wide v6, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAlbumId:J

    invoke-virtual {v3, v4, v6, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    .line 864
    const-string v4, "Pictures"

    invoke-virtual {v3, v4, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 866
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppNameEdt:Landroid/widget/EditText;

    invoke-virtual {v5}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAppName(Ljava/lang/String;)V

    .line 867
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppSubtitleEdt:Landroid/widget/EditText;

    invoke-virtual {v5}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setSubTitle(Ljava/lang/String;)V

    .line 868
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppDescriptionEdt:Landroid/widget/EditText;

    invoke-virtual {v5}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setDigest(Ljava/lang/String;)V

    .line 869
    const-string v4, "AppModel"

    iget-object v5, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v1, v5}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 871
    invoke-virtual {v3}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Lcom/brixd/niceapp/util/LocalCacheUtils;->savePendingPublishData(Ljava/lang/String;)V
    :try_end_66
    .catch Lorg/json/JSONException; {:try_start_15 .. :try_end_66} :catch_67

    goto :goto_4

    .line 872
    :catch_67
    move-exception v0

    .line 873
    .local v0, "e":Lorg/json/JSONException;
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_4
.end method

.method private setDefaultCover()V
    .registers 5

    .prologue
    const/4 v3, 0x0

    .line 733
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-lez v2, :cond_2d

    .line 734
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_a
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-ge v1, v2, :cond_31

    .line 735
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v2, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/brixd/niceapp/community/model/PictureModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/community/model/PictureModel;->isCover()Z

    move-result v2

    if-eqz v2, :cond_2e

    .line 737
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v2, v1}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/brixd/niceapp/community/model/PictureModel;

    .line 738
    .local v0, "coverPicture":Lcom/brixd/niceapp/community/model/PictureModel;
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v2, v3, v0}, Ljava/util/ArrayList;->add(ILjava/lang/Object;)V

    .line 745
    .end local v0    # "coverPicture":Lcom/brixd/niceapp/community/model/PictureModel;
    .end local v1    # "i":I
    :cond_2d
    :goto_2d
    return-void

    .line 734
    .restart local v1    # "i":I
    :cond_2e
    add-int/lit8 v1, v1, 0x1

    goto :goto_a

    .line 743
    :cond_31
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/brixd/niceapp/community/model/PictureModel;

    const/4 v3, 0x1

    invoke-virtual {v2, v3}, Lcom/brixd/niceapp/community/model/PictureModel;->setIsCover(Z)V

    goto :goto_2d
.end method

.method private uploadAppIcon(Ljava/lang/String;Ljava/lang/String;)V
    .registers 6
    .param p1, "upToken"    # Ljava/lang/String;
    .param p2, "imgPath"    # Ljava/lang/String;

    .prologue
    .line 429
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getAppName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1, p2}, Lcom/brixd/niceapp/util/ImageUtils;->generateIconImageServerPath(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 430
    .local v0, "serverPath":Ljava/lang/String;
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mHandler:Landroid/os/Handler;

    new-instance v2, Lcom/brixd/niceapp/community/activity/PublishAppActivity$10;

    invoke-direct {v2, p0, p1, v0, p2}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$10;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 447
    return-void
.end method

.method private uploadImages(Ljava/lang/String;)V
    .registers 14
    .param p1, "upToken"    # Ljava/lang/String;

    .prologue
    .line 556
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPendingUploadPictures:Ljava/util/LinkedList;

    invoke-virtual {v0}, Ljava/util/LinkedList;->getFirst()Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/brixd/niceapp/community/model/PictureModel;

    .line 558
    .local v5, "picture":Lcom/brixd/niceapp/community/model/PictureModel;
    invoke-virtual {v5}, Lcom/brixd/niceapp/community/model/PictureModel;->getImageLocalPath()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_30

    .line 559
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mImagesServerPath:Ljava/util/LinkedList;

    invoke-virtual {v5}, Lcom/brixd/niceapp/community/model/PictureModel;->getImageUriPath()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/LinkedList;->add(Ljava/lang/Object;)Z

    .line 560
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPendingUploadPictures:Ljava/util/LinkedList;

    invoke-virtual {v0}, Ljava/util/LinkedList;->removeFirst()Ljava/lang/Object;

    .line 561
    invoke-virtual {v5}, Lcom/brixd/niceapp/community/model/PictureModel;->isCover()Z

    move-result v0

    if-eqz v0, :cond_2c

    .line 562
    invoke-virtual {v5}, Lcom/brixd/niceapp/community/model/PictureModel;->getImageUriPath()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mCoverImagePath:Ljava/lang/String;

    .line 564
    :cond_2c
    invoke-direct {p0, p1}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->cycleUpload(Ljava/lang/String;)V

    .line 617
    :goto_2f
    return-void

    .line 567
    :cond_30
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v5}, Lcom/brixd/niceapp/community/model/PictureModel;->getImageLocalPath()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/brixd/niceapp/util/ImageUtils;->compressImage(Landroid/content/Context;Ljava/lang/String;)Ljava/io/File;

    move-result-object v8

    .line 570
    .local v8, "tempFile":Ljava/io/File;
    if-eqz v8, :cond_62

    invoke-virtual {v8}, Ljava/io/File;->length()J

    move-result-wide v0

    const-wide/16 v10, 0x0

    cmp-long v0, v0, v10

    if-lez v0, :cond_62

    .line 571
    move-object v4, v8

    .line 572
    .local v4, "thumbnailImg":Ljava/io/File;
    invoke-virtual {v4}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v6

    .line 573
    .local v6, "imgName":Ljava/lang/String;
    invoke-virtual {v4}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v7

    .line 580
    .local v7, "imgPath":Ljava/lang/String;
    :goto_51
    invoke-static {v6, v7}, Lcom/brixd/niceapp/util/ImageUtils;->generateImageServerPath(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 582
    .local v3, "serverPath":Ljava/lang/String;
    iget-object v9, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mHandler:Landroid/os/Handler;

    new-instance v0, Lcom/brixd/niceapp/community/activity/PublishAppActivity$13;

    move-object v1, p0

    move-object v2, p1

    invoke-direct/range {v0 .. v5}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$13;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;Lcom/brixd/niceapp/community/model/PictureModel;)V

    invoke-virtual {v9, v0}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_2f

    .line 575
    .end local v3    # "serverPath":Ljava/lang/String;
    .end local v4    # "thumbnailImg":Ljava/io/File;
    .end local v6    # "imgName":Ljava/lang/String;
    .end local v7    # "imgPath":Ljava/lang/String;
    :cond_62
    const/4 v4, 0x0

    .line 576
    .restart local v4    # "thumbnailImg":Ljava/io/File;
    invoke-virtual {v5}, Lcom/brixd/niceapp/community/model/PictureModel;->getName()Ljava/lang/String;

    move-result-object v6

    .line 577
    .restart local v6    # "imgName":Ljava/lang/String;
    invoke-virtual {v5}, Lcom/brixd/niceapp/community/model/PictureModel;->getImageLocalPath()Ljava/lang/String;

    move-result-object v7

    .restart local v7    # "imgPath":Ljava/lang/String;
    goto :goto_51
.end method

.method private validateRequestedField()Z
    .registers 5

    .prologue
    const/4 v1, 0x0

    .line 471
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppNameEdt:Landroid/widget/EditText;

    invoke-virtual {v2}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_1c

    .line 472
    const v2, 0x7f0c00d6

    invoke-static {v2}, Lcom/brixd/niceapp/util/ToastUtils;->show(I)V

    .line 510
    :goto_1b
    return v1

    .line 476
    :cond_1c
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getTags()Ljava/util/List;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-gtz v2, :cond_2f

    .line 477
    const v2, 0x7f0c00df

    invoke-static {v2}, Lcom/brixd/niceapp/util/ToastUtils;->show(I)V

    goto :goto_1b

    .line 481
    :cond_2f
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppSubtitleEdt:Landroid/widget/EditText;

    invoke-virtual {v2}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_4a

    .line 482
    const v2, 0x7f0c00dd

    invoke-static {v2}, Lcom/brixd/niceapp/util/ToastUtils;->show(I)V

    goto :goto_1b

    .line 484
    :cond_4a
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppSubtitleEdt:Landroid/widget/EditText;

    invoke-virtual {v2}, Landroid/widget/EditText;->length()I

    move-result v2

    const/16 v3, 0xf

    if-le v2, v3, :cond_5b

    .line 485
    const v2, 0x7f0c00de

    invoke-static {v2}, Lcom/brixd/niceapp/util/ToastUtils;->show(I)V

    goto :goto_1b

    .line 489
    :cond_5b
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppDescriptionEdt:Landroid/widget/EditText;

    invoke-virtual {v2}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    .line 490
    .local v0, "description":Ljava/lang/String;
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v2

    const/16 v3, 0xa

    if-ge v2, v3, :cond_78

    .line 491
    const v2, 0x7f0c00dc

    invoke-static {v2}, Lcom/brixd/niceapp/util/ToastUtils;->show(I)V

    goto :goto_1b

    .line 495
    :cond_78
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v2

    const/16 v3, 0x2710

    if-le v2, v3, :cond_87

    .line 496
    const v2, 0x7f0c00db

    invoke-static {v2}, Lcom/brixd/niceapp/util/ToastUtils;->show(I)V

    goto :goto_1b

    .line 500
    :cond_87
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-nez v2, :cond_96

    .line 501
    const v2, 0x7f0c00da

    invoke-static {v2}, Lcom/brixd/niceapp/util/ToastUtils;->show(I)V

    goto :goto_1b

    .line 505
    :cond_96
    invoke-static {}, Lcom/brixd/niceapp/service/UserService;->isUserLogin()Z

    move-result v2

    if-nez v2, :cond_a9

    .line 506
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-static {}, Lcom/brixd/niceapp/util/SettingUtils;->getSignonPublishAppHint()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/brixd/niceapp/service/LoginService;->login(Landroid/content/Context;Ljava/lang/String;)V

    goto/16 :goto_1b

    .line 510
    :cond_a9
    const/4 v1, 0x1

    goto/16 :goto_1b
.end method


# virtual methods
.method public onActivityResult(IILandroid/content/Intent;)V
    .registers 12
    .param p1, "requestCode"    # I
    .param p2, "resultCode"    # I
    .param p3, "data"    # Landroid/content/Intent;

    .prologue
    .line 926
    invoke-super {p0, p1, p2, p3}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onActivityResult(IILandroid/content/Intent;)V

    .line 927
    const/4 v4, -0x1

    if-ne p2, v4, :cond_b

    if-eqz p3, :cond_b

    .line 928
    sparse-switch p1, :sswitch_data_8a

    .line 991
    :cond_b
    :goto_b
    return-void

    .line 930
    :sswitch_c
    const-string v4, "AlbumId"

    const-wide/16 v6, 0x0

    invoke-virtual {p3, v4, v6, v7}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J

    move-result-wide v4

    iput-wide v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAlbumId:J

    .line 931
    const-string v4, "Pictures"

    invoke-virtual {p3, v4}, Landroid/content/Intent;->getParcelableArrayListExtra(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v2

    .line 932
    .local v2, "pictures":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/community/model/PictureModel;>;"
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v4, v2}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    .line 934
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->setDefaultCover()V

    .line 935
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->refreshPictures()V

    .line 937
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mHandler:Landroid/os/Handler;

    new-instance v5, Lcom/brixd/niceapp/community/activity/PublishAppActivity$20;

    invoke-direct {v5, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$20;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    invoke-virtual {v4, v5}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_b

    .line 946
    .end local v2    # "pictures":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/community/model/PictureModel;>;"
    :sswitch_32
    const-string v4, "Pictures"

    invoke-virtual {p3, v4}, Landroid/content/Intent;->getParcelableArrayListExtra(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v4

    iput-object v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    .line 948
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->setDefaultCover()V

    .line 949
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->refreshPictures()V

    .line 951
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mHandler:Landroid/os/Handler;

    new-instance v5, Lcom/brixd/niceapp/community/activity/PublishAppActivity$21;

    invoke-direct {v5, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$21;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    invoke-virtual {v4, v5}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_b

    .line 961
    :sswitch_4b
    const-string v4, "AppName"

    invoke-virtual {p3, v4}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 962
    .local v0, "appName":Ljava/lang/String;
    const-string v4, "PackageName"

    invoke-virtual {p3, v4}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 963
    .local v1, "packageName":Ljava/lang/String;
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v4, v0}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAppName(Ljava/lang/String;)V

    .line 964
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v4, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setPackageName(Ljava/lang/String;)V

    .line 965
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppNameEdt:Landroid/widget/EditText;

    invoke-virtual {v4, v0}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 966
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mHandler:Landroid/os/Handler;

    new-instance v5, Lcom/brixd/niceapp/community/activity/PublishAppActivity$22;

    invoke-direct {v5, p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity$22;-><init>(Lcom/brixd/niceapp/community/activity/PublishAppActivity;)V

    invoke-virtual {v4, v5}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 973
    const/4 v4, 0x1

    invoke-direct {p0, v4}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->loadIcon(Z)V

    goto :goto_b

    .line 978
    .end local v0    # "appName":Ljava/lang/String;
    .end local v1    # "packageName":Ljava/lang/String;
    :sswitch_75
    const-string v4, "Tags"

    invoke-virtual {p3, v4}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v3

    check-cast v3, Ljava/util/ArrayList;

    .line 980
    .local v3, "selectedTags":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/model/TagModel;>;"
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v4, v3}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setTags(Ljava/util/List;)V

    .line 981
    invoke-direct {p0, v3}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->inflateTags(Ljava/util/List;)V

    .line 983
    invoke-direct {p0, v3}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->refreshTagArea(Ljava/util/List;)V

    goto :goto_b

    .line 928
    nop

    :sswitch_data_8a
    .sparse-switch
        0xa -> :sswitch_c
        0x14 -> :sswitch_32
        0x1e -> :sswitch_4b
        0x28 -> :sswitch_75
    .end sparse-switch
.end method

.method public onBackPressed()V
    .registers 3

    .prologue
    .line 463
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getActivity()Landroid/app/Activity;

    move-result-object v0

    const-string v1, "CommunityPublishAppClickBack"

    invoke-static {v0, v1}, Lcom/umeng/analytics/MobclickAgent;->onEvent(Landroid/content/Context;Ljava/lang/String;)V

    .line 465
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->savePendingPublishDataToLocal()V

    .line 466
    const/16 v0, 0x3e8

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->setResult(I)V

    .line 467
    invoke-super {p0}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onBackPressed()V

    .line 468
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .registers 4
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    .line 140
    invoke-super {p0, p1}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onCreate(Landroid/os/Bundle;)V

    .line 141
    const v0, 0x7f030017

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->setContentView(I)V

    .line 143
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->getSwipeBackLayout()Lcom/brixd/android/swipeback/lib/SwipeBackLayout;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/brixd/android/swipeback/lib/SwipeBackLayout;->setEnableGesture(Z)V

    .line 144
    invoke-direct {p0, p1}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->initData(Landroid/os/Bundle;)V

    .line 145
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->initWidgets()V

    .line 146
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->initWidgetsActions()V

    .line 148
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->refreshPictures()V

    .line 149
    return-void
.end method

.method protected onPause()V
    .registers 2

    .prologue
    .line 131
    invoke-super {p0}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onPause()V

    .line 132
    const-string v0, "PublishAppActivity"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageEnd(Ljava/lang/String;)V

    .line 133
    invoke-static {p0}, Lcom/umeng/analytics/MobclickAgent;->onPause(Landroid/content/Context;)V

    .line 135
    invoke-static {}, Lcom/brixd/niceapp/bus/BusProvider;->getInstance()Lcom/squareup/otto/Bus;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/squareup/otto/Bus;->unregister(Ljava/lang/Object;)V

    .line 136
    return-void
.end method

.method protected onResume()V
    .registers 2

    .prologue
    .line 122
    invoke-super {p0}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onResume()V

    .line 123
    const-string v0, "PublishAppActivity"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageStart(Ljava/lang/String;)V

    .line 124
    invoke-static {p0}, Lcom/umeng/analytics/MobclickAgent;->onResume(Landroid/content/Context;)V

    .line 126
    invoke-static {}, Lcom/brixd/niceapp/bus/BusProvider;->getInstance()Lcom/squareup/otto/Bus;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/squareup/otto/Bus;->register(Ljava/lang/Object;)V

    .line 127
    return-void
.end method

.method protected onSaveInstanceState(Landroid/os/Bundle;)V
    .registers 6
    .param p1, "outState"    # Landroid/os/Bundle;

    .prologue
    .line 884
    invoke-super {p0, p1}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onSaveInstanceState(Landroid/os/Bundle;)V

    .line 885
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->savePendingPublishDataToLocal()V

    .line 887
    const-string v0, "IsEditMode"

    iget-boolean v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mIsEditMode:Z

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    .line 888
    const-string v0, "AlbumId"

    iget-wide v2, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAlbumId:J

    invoke-virtual {p1, v0, v2, v3}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V

    .line 889
    const-string v0, "Pictures"

    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putParcelableArrayList(Ljava/lang/String;Ljava/util/ArrayList;)V

    .line 891
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppNameEdt:Landroid/widget/EditText;

    invoke-virtual {v1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAppName(Ljava/lang/String;)V

    .line 892
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppSubtitleEdt:Landroid/widget/EditText;

    invoke-virtual {v1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setSubTitle(Ljava/lang/String;)V

    .line 893
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppDescriptionEdt:Landroid/widget/EditText;

    invoke-virtual {v1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setDigest(Ljava/lang/String;)V

    .line 894
    const-string v0, "AppModel"

    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->mAppModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V

    .line 895
    return-void
.end method

.method public onUserSigon(Lcom/brixd/niceapp/bus/event/UserSignonEvent;)V
    .registers 2
    .param p1, "event"    # Lcom/brixd/niceapp/bus/event/UserSignonEvent;
    .annotation runtime Lcom/squareup/otto/Subscribe;
    .end annotation

    .prologue
    .line 996
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/PublishAppActivity;->checkAndPublishApp()V

    .line 997
    return-void
.end method
